package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc GetLastFromDataSpecifiedDto
 * @使用场景
 */
@Data
public class GetLastFromDataSpecifiedDto
        extends BaseDto
        implements Serializable {

    /**
     * 通用主键ID
     */
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * 传输数值
     */
    @ApiModelProperty("传输数值")
    private Long outputNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        GetLastFromDataSpecifiedDto that = (GetLastFromDataSpecifiedDto) o;
        return commPrimaryKey == that.commPrimaryKey && outputNum == that.outputNum;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), commPrimaryKey, outputNum);
    }

}
